package _2_2基础算法;

import java.util.Scanner;

public class _1389二分_二分查找数组元素 {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int data[] = new int[200];
		for(int i = 0;i < 200; i++) {
			data[i] = 4 * i + 6;
		}
		int target = scan.nextInt();
		
		int left = 0;
		int right = data.length - 1;
		int mid = (left + right) / 2;
		while(left < right) {
			if(data[mid] == target) {
				break;
			}
			// 数组元素比目标值大，则该元素右边的都不需要了
			if(data[mid] > target) {
				right = mid;
			}else {
				left = mid;
			}
			
			mid = (left + right ) / 2;
		}
		
		System.out.println(mid);
		
		scan.close();
		
	}

}
